


/**
 * 天气查询Api
 */
function getWeatherByCity(city, callBack = null) {
  wx.request({
    url: 'https://www.apiopen.top/weatherApi',
    data: {
      "city":city
    },
    header: {
      "content-type": "application/json"
    },
    method:"POST",
    success(res) {
      callBack(res.data.data.forecast)

    },
    fail(err) {
      callBack(err)
    }
  })
}



/**
 * 模块导出
 */
module.exports={
  getWeatherByCity: getWeatherByCity,
}